package com.neu.questionnaireplus.service;

import com.neu.questionnaireplus.entity.Admin;

public interface AdminService {

  /**
   * @Description: 通过密码登录
   * @Param: [username, password]
   * @return: boolean
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  boolean loginByPassword( String username, String password);


  /**
   * @Description: 通过用户输入的inputStr验证码和真实验证码realStr进行比较，同时查询手机号是否存在，若存在且验证正确，登录放行
   * @Param: [phone, inputStr, realStr]
   * @return: boolean
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/11/2
   */
  boolean loginByPhone(String phone,String inputStr,String realStr);

  /**
  * @Description: 验证短信验证码
  * @Param: [phone, inputStr, realStr]
  * @return: boolean
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/4
  */
  boolean checkStr(String phone,String inputStr,String realStr);
  
  /** 
  * @Description: 更新管理员 
  * @Param: [admin] 
  * @return: boolean 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/4 
  */ 
  boolean updateAdmin(Admin admin);

  /**
  * @Description: 通过用户名查询admin
  * @Param: [username]
  * @return: com.neu.questionnaireplus.entity.Admin
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/4
  */
  Admin queryAdminByUsername(String username);

  /**
  * @Description: 通过手机号查询admin
  * @Param: [phone]
  * @return: com.neu.questionnaireplus.entity.Admin
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/4
  */
  Admin queryAdminByPhone(String phone);
}
